
<template>
    <!-- 学校管理 -->
    <div>
      

        <el-card class="box-card">
            <div slot="header" class="clearfix">
                <span style="line-height: 36px;">学校列表</span>
                <el-button type="primary" style="float:right" @click="goAddSchool">新增</el-button>
            </div>
            <school-list ref="schoolList" @goAddHostial="goAddHostial" @goschoolEditer="goschoolEditer"></school-list>
        </el-card>
        <el-dialog title="新增学校" :visible.sync="schoolAdd" v-if="schoolAdd" size="larger">
            <school-show :type="'新增'" @close="close">
            </school-show>
        </el-dialog>
        <el-dialog title="查看学校" :visible.sync="schoolEditer" v-if="schoolEditer" size="larger">
            <school-show :type="'修改'" :Id="sid" @close="close">
            </school-show>
        </el-dialog>
    </div>
</template>
<script>
import SchoolList from '@/components/System/SchoolList'
// import HospitalShow from '@/components/System/HospitalShow'
import SchoolShow from '@/components/System/SchoolShow'
export default {
    data() {
        return {
            daterange: '',
            schoolAdd: false,//学校新增
            schoolEditer: false,//学校编辑
            sid: '',//学校id
            hospitalAdd: false,
            hid: '',// id
            ORGANIZATION_NAME: ""
        }

    },
    components: {
        'school-list': SchoolList,
        // 'hospital-show': HospitalShow,
        'school-show': SchoolShow
    },
    methods: {
        onSubmit: function() {
            // console.log(this.daterange)
        },
        AddOrganization: function() {

        },
        close(){
         this.schoolAdd = false;
         this.schoolEditer=false;
         this.$refs.schoolList.SelectMultipel();
        },
        //推荐医院
        goAddHostial(hid) {
            this.hid = hid;
            this.hospitalAdd = true;
        },
        //新增学校
        goAddSchool(oid) {
            this.schoolAdd = true;
        },
        //修改查看学校
        goschoolEditer(id) {
            this.schoolEditer = true;
            this.sid=id;
        }
    }
}
</script>

